<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计数器2</title>
</head>
<body>
<h1>菜园</h1>
<h2>大白菜</h2>
<h2>青菜</h2>
<h2>罗卡</h2>
<h1>果园</h1>
<h2>苹果</h2>
<h2>西瓜</h2>
<h1>动物</h1>
<h2>熊猫</h2>
<h2>狗</h2>
<style>
    body{
        counter-reset: one;

    }
    h1{
        counter-reset:two
    }
    h2::before{
        counter-increment: two;
        content: '小节'counter(one)'.'counter(two)'-';
    }
    h1::before{
        counter-increment: one;
        content:'章节'counter(one)'-';
    }
</style>
</body>
</html>